package io.github.definitlyevil.ziminmod.cif.tools;

import de.tr7zw.nbtapi.NBTCompound;
import io.github.definitlyevil.customitemframework.BaseItem;
import io.github.definitlyevil.customitemframework.CIFItemInstance;
import org.bukkit.Material;
import org.bukkit.event.Event;
import org.bukkit.event.player.PlayerInteractEvent;

import java.util.Arrays;
import java.util.List;

public class ZiMinPickaxe extends BaseItem {
    @Override
    public String getDisplayName(NBTCompound nbtCompound) {
        return "\u00a7e\u00a7l针男人镐";
    }

    @Override
    public Material getModelMaterial() {
        return Material.DIAMOND_PICKAXE;
    }

    @Override
    public int getCustomModelData(CIFItemInstance instance) {
        return 1000;
    }

    @Override
    public void onUseInHand(CIFItemInstance instance, PlayerInteractEvent event) {
        event.setUseItemInHand(Event.Result.ALLOW);
    }

    @Override
    public boolean isUnbreakable() {
        return false;
    }

    private static final List<String> LORE = Arrays.asList(
        "\u00a7e由“石粒”组成的针男人镐，",
        "\u00a7e可以快速挖掉所有类型的矿",
        "\u00a7e石！"
    );
    @Override
    public List<String> getLore(CIFItemInstance instance) {
        return LORE;
    }

    @Override
    public boolean isBlock() {
        return false;
    }
}
